//
//  SYRouter.m
//  SYPerfectDemo
//
//  Created by Lssyyy on 2018/6/8.
//  Copyright © 2018年 Lssyyy. All rights reserved.
//

#import "SYRouter.h"
#import "MGJRouter.h"
#import "SQLiteVC.h"
#import "SYRouterManager.h"
@interface SYRouter ()

@end

@implementation SYRouter

- (void)viewDidLoad {
    [super viewDidLoad];
//    [self registerMGJ];
}

- (void)registerMGJ{
//    [MGJRouter registerURLPattern:@"ToSqlite" toHandler:^(NSDictionary *routerParameters) {
//        SQLiteVC *vc = [[SQLiteVC alloc]init];
//        [self.navigationController pushViewController:vc animated:YES];
//    }];
    [MGJRouter registerURLPattern:@"ToSqlite" toObjectHandler:^id(NSDictionary *routerParameters) {
        SQLiteVC *vc = [[SQLiteVC alloc]init];
        [self.navigationController pushViewController:vc animated:YES];
        return nil;
    }];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
//    [MGJRouter openURL:@"ToSqlite"];
    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@"123",@"keyWord",nil];
    [[SYRouterManager sharedRouteManager]openSignInURLWithUserInfo:dic completion:^(id result) {
        NSLog(@"登录成功");
    }];
}

@end
